local huanyingjingpo = fk.CreateSkill{
    name = "huanyingjingpo"
}

Fk:loadTranslationTable{
    ["huanyingjingpo"] = "境破",
    [":huanyingjingpo"] = "每回合限一次，当你造成伤害后，可以令伤害翻三倍，并令其在现在，其回合开始时各失去相当于伤害三倍的体力。",

    ["@suyuanshikongzhan"] = "溯源时空斩",
}

huanyingjingpo:addEffect(fk.DamageInflicted,{
can_trigger = function(self, event, target, player, data)
    return player:hasSkill(self.name) and data.from == player and player:usedSkillTimes(self.name,player.HistoryPhase) == 0
end,
on_use = function(self, event, target, player, data)
    local room = player.room
    data:changeDamage(2*data.damage)
      room:loseHp(data.to,data.damage,"huanyingjingpo")
      room:addPlayerMark(data.to ,"@suyuanshikongzhan",data.damage)
end,
})

huanyingjingpo:addEffect(fk.TurnStart,{
    can_trigger = function(self,event,target,player,data)
        return player:getMark("@suyuanshikongzhan",target) > 0
    end,
    on_use = function(self,event,target,player,data)
        local zhan = player:getMark("@suyuanshikongzhan",target)
        room:loseHp(target,zhan,"huanyingjingpo")
        room:setPlayerMark(player,"@suyuanshikongzhan",0)
    end,
})

return huanyingjingpo